﻿<UserControl x:Class="NetflixFormsApplication.Views.MovieWPFSearchView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="451" d:DesignWidth="768">
    <UserControl.Resources>
        <DataTemplate x:Key="ImageGalleryDataTemplate">
            <Grid>
                <Border BorderBrush="#FFFF9800" BorderThickness="3"  Width="120" Height="120" Padding="10" Margin="15" CornerRadius="10">
                    <!--Bind Image Path in Image Control-->
                    <Image Source="{Binding ImagePath}" Stretch="Fill"  HorizontalAlignment="Center">
                        <!--View Large Image on Image Control Tooltip-->
                        <Image.ToolTip>
                            <Grid>
                                <Image Source="{Binding ImagePath}" Stretch="Fill" HorizontalAlignment="Center" Height="200" Width="200"></Image>
                            </Grid>
                        </Image.ToolTip>

                    </Image>

                </Border>
            </Grid>
        </DataTemplate>
        <ItemsPanelTemplate x:Key="ImageGalleryItemsPanelTemplate"><!--Display Images on UniformGrid Panel-->
            <UniformGrid Columns="4" HorizontalAlignment="Center" VerticalAlignment="Stretch"/>
        </ItemsPanelTemplate>
    </UserControl.Resources>
    <Grid Height="452" Width="763">
        <Button Content="Search" Height="23" HorizontalAlignment="Left" Margin="668,9,0,0" Name="button1" VerticalAlignment="Top" Width="75" Click="searchButtonClick" />
        <TextBox Height="23" HorizontalAlignment="Left" Margin="80,9,0,0" Name="releaseYearTextBox" VerticalAlignment="Top" Width="120" Text="2005" />
        <TextBlock Height="23" HorizontalAlignment="Left" Margin="12,12,0,0" Name="textBlock1" Text="Release Year:" VerticalAlignment="Top" />
        <TextBlock Height="23" HorizontalAlignment="Left" Margin="206,12,0,0" Name="textBlock2" Text="Max Results:" VerticalAlignment="Top" />
        <TextBox Height="23" HorizontalAlignment="Left" Margin="273,9,0,0" Name="maxResultSetTextBox" VerticalAlignment="Top" Width="33" Text="50" />
        <TextBox Height="23" HorizontalAlignment="Left" Margin="12,417,0,0" Name="resultsTextBox" VerticalAlignment="Top" Width="739" IsEnabled="False" />
        <ListBox x:Name="LsImageGallery"  ItemsSource="{Binding}" ItemTemplate="{DynamicResource ImageGalleryDataTemplate}" ItemsPanel="{DynamicResource ImageGalleryItemsPanelTemplate}" Margin="0,51,0,41">
            <ListBox.Background>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="Black"/>
                    <GradientStop Color="#FF1E2A2F" Offset="1"/>
                </LinearGradientBrush>
            </ListBox.Background>
        </ListBox>
    </Grid>
</UserControl>
